package com.m4f.city.business.domain.oauth2;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Blob;
import com.google.appengine.api.datastore.Key;
import com.m4f.city.business.domain.Application;
import com.m4f.city.business.domain.InternalUser;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true")
public class OAuth2AccessTokenDS {
	
	@PrimaryKey  
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	
	@Persistent
	private Long userId;
	
	@Persistent
	private String clientId;
	
	@Persistent
	private String accessTokenValue;
	
	@Persistent
	private Blob accessToken;
	
	@Persistent
	private String refreshTokenValue;
	
	@Persistent
	private Blob refreshToken;
	
	@Persistent
	private Blob authentication;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	public String getAccessTokenValue() {
		return accessTokenValue;
	}

	public void setAccessTokenValue(String accessTokenValue) {
		this.accessTokenValue = accessTokenValue;
	}

	public Blob getAccessToken() {
		return accessToken;
	}

	public void setAccessToken(Blob accessToken) {
		this.accessToken = accessToken;
	}

	public String getRefreshTokenValue() {
		return refreshTokenValue;
	}

	public void setRefreshTokenValue(String refreshTokenValue) {
		this.refreshTokenValue = refreshTokenValue;
	}

	public Blob getRefreshToken() {
		return refreshToken;
	}

	public void setRefreshToken(Blob refreshToken) {
		this.refreshToken = refreshToken;
	}

	public Blob getAuthentication() {
		return authentication;
	}

	public void setAuthentication(Blob authentication) {
		this.authentication = authentication;
	}
}
